package com.ruowei.modules.foodOrder.web.dto;

import com.ruowei.modules.foodOrder.domain.enumeration.OrderStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.Instant;
import java.util.List;

@Data
public class OrderListDTO {

    @ApiModelProperty(value = "订单编码")
    private String orderCode;

    @ApiModelProperty(value = "商家名称")
    private String merchantName;

    @ApiModelProperty(value = "状态 待支付、待接单、商家已接单、配送员已接单、已送达、退款中、已退款、退款失败")
    private OrderStatus status;

    @ApiModelProperty(value = "总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "收货人姓名")
    private String receiverName;

    @ApiModelProperty(value = "实付金额")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "支付方式")
    private String payType;

    @ApiModelProperty(value = "生成时间")
    private Instant createTime;

    @ApiModelProperty(value = "支付时间")
    private Instant paymentTime;

    @ApiModelProperty(value = "商家接单时间")
    private Instant merchantReceiveTime;

    @ApiModelProperty(value = "配送员接单时间")
    private Instant courierReceiveTime;

    @ApiModelProperty(value = "送出时间")
    private Instant deliveryTime;

    @ApiModelProperty(value = "送达时间")
    private Instant receiveTime;


    public OrderListDTO(String orderCode, String merchantName, OrderStatus status,
                        BigDecimal totalAmount, String receiverName, BigDecimal payAmount,
                        String payType, Instant createTime, Instant paymentTime,
                        Instant merchantReceiveTime, Instant courierReceiveTime,
                        Instant deliveryTime, Instant receiveTime) {
        this.orderCode = orderCode;
        this.merchantName = merchantName;
        this.status = status;
        this.totalAmount = totalAmount;
        this.receiverName = receiverName;
        this.payAmount = payAmount;
        this.payType = payType;
        this.createTime = createTime;
        this.paymentTime = paymentTime;
        this.merchantReceiveTime = merchantReceiveTime;
        this.courierReceiveTime = courierReceiveTime;
        this.deliveryTime = deliveryTime;
        this.receiveTime = receiveTime;
    }
    //    @ApiModelProperty(value = "商品列表")
//    private List<GoodsListDTO> goodsList;

//    @ApiModelProperty(value = "商品名称")
//    private String merchandiseName;
//
//    @ApiModelProperty(value = "商品图片")
//    private String photos;
//
//    @ApiModelProperty(value = "单价")
//    private BigDecimal unitPrice;
//
//    @ApiModelProperty(value = "数量")
//    private Integer quantity;
}
